<template>
    <div>
        <h1>Vue Router Demo</h1>
        <button @click="back">后退</button>
        <button @click="forward">前进</button>
        <button @click="test">测试一下go</button>
    </div>
</template>

<script>
    export default{
            name:'Banner-test',
            data(){
                return{
                     
                }
            },
            methods: {
                back(){
                    this.$router.back()
                },
                forward(){
                    this.$router.forward()
                },
                test(){
                    this.$router.go(-2)//正数向前走几步，负数向后走几步
                }
            },
            }
</script>

<style scoped>

</style>